package org.csmzxy.class2333;

interface Swim{
    void swimming();
}
public class Example18 {
    public static void main(String[] args){
        String name = "小明";
        new Swim(){
            @Override
            public void swimming(){
                System.out.println(name + "学会了自由泳......");
            }
        }.swimming();
        new Swim(){
            @Override
            public void swimming(){
                System.out.println(name + "学会了蛙泳......");
            }
        }.swimming();
        }
    }

